import newRequest from '@/utils/newRequest'
import { mergeParams } from '@/utils'

// 获取患者数据
export function getBaqsjRecordProperty(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/BaqsjRecordProperty/doQueryPage',
    method: 'post',
    data
  })
}

// 获取用药数据
export function getBaqsjRecordUntowardeffectDrug(query) {
  const data = mergeParams(query)
  return newRequest({
    url: 'MTSaas/BaqsjRecordUntowardeffectDrug/doQueryPage',
    method: 'post',
    data
  })
}

export function doQueryDetail(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doQueryDetail',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-意外事件-跌倒、坠床事件
export function doSaveAccidentFall(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveAccidentFall',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-意外事件-其他意外事件
export function doSaveAccidentOther(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveAccidentOther',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-意外事件-意外拔管事件
export function doSaveAccidentTubeDrawing(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveAccidentTubeDrawing',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-意外事件-烧烫伤事件
export function doSaveAccidentBurnScald(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveAccidentBurnScald',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-意外事件-出走事件
export function doSaveAccidentOut(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveAccidentOut',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-诊疗相关-饮食差错事件
export function doSaveDiagnosisDietWrong(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveDiagnosisDietWrong',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-诊疗相关-输液反应事件
export function doSaveDiagnosisInfusionReaction(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveDiagnosisInfusionReaction',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-诊疗相关-医疗处置事件
export function doSaveDiagnosisMedicalHandle(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveDiagnosisMedicalHandle',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-诊疗相关-其他反应事件
export function doSaveDiagnosisOtherReaction(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveDiagnosisOtherReaction',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-诊疗相关-报告异常，报告、标本差错事件
export function doSaveDiagnosisSampleWrong(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveDiagnosisSampleWrong',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-医患沟通相关-医患沟通（纠纷）事件
export function doSaveDoctorAndPatientNegotiation(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveDoctorAndPatientNegotiation',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-院感相关-院内感染事件
export function doSaveHospitalInfected(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveHospitalInfected',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-药物相关-药物不良反应事件
export function doSaveMedicalBadReaction(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveMedicalBadReaction',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-医疗器械相关-医疗器械事件
export function doSaveMedicalInstrument(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveMedicalInstrument',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-药物相关-给药错误事件
export function doSaveMedicalWrongDrug(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveMedicalWrongDrug',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-其他不良事件上报-其他事件
export function doSaveOtherReactionGeneral(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveOtherReactionGeneral',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-其他不良事件上报-公共事件
export function doSaveOtherReactionPublic(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveOtherReactionPublic',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-其他不良事件上报-公共治安事件
export function doSaveOtherReactionPublicSecurity(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveOtherReactionPublicSecurity',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-防保相关-职业暴露不良事件
export function doSavePreventionAndProtection(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSavePreventionAndProtection',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-手术相关-手术不良事件
export function doSaveSurgicalBad(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveSurgicalBad',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-手术相关-非计划手术不良事件/非计划再次手术事件
export function doSaveSurgicalNonPlaned(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveSurgicalNonPlaned',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-手术相关-操作不良事件、手术不良事件
export function doSaveSurgicalOperationBad(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveSurgicalOperationBad',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-输血相关-输⾎反应事件
export function doSaveTransfusionBloodReaction(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveTransfusionBloodReaction',
    method: 'post',
    data
  })
}

// 新增、编辑、暂存申报-输血相关-用血错误事件
export function doSaveTransfusionWrongBlood(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/baqsjRecord/doSaveTransfusionWrongBlood',
    method: 'post',
    data
  })
}
